package com.lds.config.center.common.model.item.request;

import com.lds.management.center.common.model.db.PageCondition;
import lombok.*;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 分页 - 请求
 *
 * @author lidongsheng
 * @since 2025-06-30
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class ItemBaseListPageRequest extends PageCondition implements Serializable {
    /**
     * 属性ID
     */
    private Long id;

    /**
     * 属性名
     */
    private String name;
    /**
     * 属性值
     */
    private String value;
    /**
     * 配置项类型，0: String，1: Number，2: Boolean，3: JSON
     */
    private Integer valueType;
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    private LocalDateTime updateTime;
    /**
     * 配置文件ID
     */
    private Long namespaceId;

    public void setName(String name) {
        this.name = StringUtils.trimToNull(name);
    }

    public void setValue(String value) {
        this.value = StringUtils.trimToNull(value);
    }

}
